/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2018-2019.
 * Create: 2023
 */

#ifndef LINUX_EULEROS_MM_H
#define LINUX_EULEROS_MM_H
#include <linux/mm.h>

#ifdef CONFIG_EULEROS_VIRTUAL
#include <linux/memcontrol.h>
#include <linux/delay.h>

int vma_allowed_swap_pages(struct vm_area_struct *vma);
int mem_cgroup_drop_caches(struct cgroup_subsys_state *css, struct cftype *cft,
				u64 val);
int mem_cgroup_invalidate_inode_page(struct page *page, void *memcg);
unsigned long memcg_invalidate_mapping_pages(struct address_space *mapping,
					pgoff_t start, pgoff_t end,
					unsigned long *nr_pageveci,
					void *memcg);
extern unsigned long __invalidate_mapping_pages(struct address_space *mapping,
		pgoff_t start, pgoff_t end, unsigned long *nr_pagevec, void *unused);
extern void drop_pagecache_sb(struct super_block *sb, void *memcg);
#ifdef CONFIG_SYSCTL
extern unsigned long shrink_slab(gfp_t gfp_mask, int nid,
				 struct mem_cgroup *memcg,
				 int priority);
#endif /* CONFIG_SYSCTL */
#endif /* CONFIG_EULEROS_VIRTUAL */
#endif /* LINUX_EULEROS_MM_H */
